#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.api;

import ${package}.api.dto.DemoDto;
import com.ruoyi.common.core.dto.CommonResultDto;
import com.ruoyi.common.core.web.page.PageResultDto;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
/**
 * Demo示例
 *
 * @author ruoyi
 * @date 2022-02-15 10:59:29
 */
@Tag(name = "Demo Api")
public interface DemoApi {

    /**
     * 分页查询示例信息
     */
    @GetMapping("/selectPage")
    @Operation(summary = "分页查询示例信息",description = "获取示例信息列表")
    PageResultDto<DemoDto> selectPage(DemoDto demo);

    /**
     * 获取示例信息列表
     */
    @GetMapping("/list")
    @Operation(summary = "获取示例信息列表", description = "获取示例信息列表")
    CommonResultDto<List<DemoDto>> list(DemoDto demo);

    /**
     * 导出示例信息
     *
     * @param response
     * @param demo
     */
    @PostMapping("/export")
    @Operation(summary = "导出示例信息", description = "导出示例信息")
    void export(HttpServletResponse response, DemoDto demo);

    /**
     * 查询示例信息详细信息
     */
    @GetMapping("/{id}")
    @Operation(summary = "查询示例信息详细信息", description = "查询示例信息详细信息")
    CommonResultDto<DemoDto> getInfo(@PathVariable Long id);

    /**
     * 新增示例信息
     */
    @PostMapping
    @Operation(summary = "新增示例信息", description = "新增示例信息")
    CommonResultDto<Boolean> add(@Validated @RequestBody DemoDto demo);

    /**
     * 修改示例信息
     */
    @PutMapping
    @Operation(summary = "修改示例信息", description = "修改示例信息")
    CommonResultDto<Boolean> edit(@Validated @RequestBody DemoDto demo);

    /**
     * 删除示例信息
     */
    @DeleteMapping("/{ids}")
    @Operation(summary = "删除示例信息", description = "删除示例信息")
    CommonResultDto<Boolean> remove(@PathVariable Long[] ids);
}
